{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pca"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "dataMat = pca.loadDataSet('testSet.txt')\n",
    "lowDMat, reconMat = pca.pca(dataMat, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1000, 1)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shape(lowDMat)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD4CAYAAAD4k815AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO2dfZgU9ZXvv6d7qqEHIw2RJDJCIN4s7EUFdJJ4QzYJ6hUThBCNsKKrieayue5uFM1sxtUrgzd5nF02q+buNTfe6CasL5fxbQKyJiZiNpEN2QV5ERJMoiRAYyKJNLsy7UxN97l/9FRTXV0vv6qu7q7qPp/n8Rnp6e76dff0t06d3/ecQ8wMQRAEoXVINHsBgiAIQriIsAuCILQYIuyCIAgthgi7IAhCiyHCLgiC0GJ0NPJgp512Gs+YMaORhxQEQYg9O3bs+B0zT1G9f0OFfcaMGdi+fXsjDykIghB7iOjXfu4vqRhBEIQWQ4RdEAShxRBhFwRBaDE8hZ2IHiSi14lor83vvkBETESn1Wd5giAIgl9UIvZvArjEeiMRTQPwXwEcDHlNgiAIQg14umKY+YdENMPmV3cD+EsA3w55TYIgRIjBnVms++7LOJLLY2omjZ5Fs7BsflezlyW4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"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "plt.scatter(dataMat[:,0], dataMat[:, 1])\n",
    "plt.scatter(reconMat[:,0], reconMat[:, 1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 5.34151979e+07,  2.17466719e+07,  8.24837662e+06,  2.07388086e+06,\n",
       "        1.31540439e+06,  4.67693557e+05,  2.90863555e+05,  2.83668601e+05,\n",
       "        2.37155830e+05,  2.08513836e+05,  1.96098849e+05,  1.86856549e+05,\n",
       "        1.52422354e+05,  1.13215032e+05,  1.08493848e+05,  1.02849533e+05,\n",
       "        1.00166164e+05,  8.33473762e+04,  8.15850591e+04,  7.76560524e+04,\n",
       "        6.66060410e+04,  6.52620058e+04,  5.96776503e+04,  5.16269933e+04,\n",
       "        5.03324580e+04,  4.54661746e+04,  4.41914029e+04,  4.15532551e+04,\n",
       "        3.55294040e+04,  3.31436743e+04,  2.67385181e+04,  1.47123429e+04,\n",
       "        1.44089194e+04,  1.09321187e+04,  1.04841308e+04,  9.48876548e+03,\n",
       "        8.34665462e+03,  7.22765535e+03,  5.34196392e+03,  4.95614671e+03,\n",
       "        4.23060022e+03,  4.10673182e+03,  3.41199406e+03,  3.24193522e+03,\n",
       "        2.74523635e+03,  2.35027999e+03,  2.16835314e+03,  1.86414157e+03,\n",
       "        1.76741826e+03,  1.70492093e+03,  1.66199683e+03,  1.53948465e+03,\n",
       "        1.33096008e+03,  1.25591691e+03,  1.15509389e+03,  1.12410108e+03,\n",
       "        1.03213798e+03,  1.00972093e+03,  9.50542179e+02,  9.09791361e+02,\n",
       "        8.32001551e+02,  8.08898242e+02,  7.37343627e+02,  6.87596830e+02,\n",
       "        5.64452104e+02,  5.51812250e+02,  5.37209115e+02,  4.93029995e+02,\n",
       "        4.13720573e+02,  3.90222119e+02,  3.37288784e+02,  3.27558605e+02,\n",
       "        3.08869553e+02,  2.46285839e+02,  2.28893093e+02,  1.96447852e+02,\n",
       "        1.75559820e+02,  1.65795169e+02,  1.56428052e+02,  1.39671194e+02,\n",
       "        1.28662864e+02,  1.15624070e+02,  1.10318239e+02,  1.08663541e+02,\n",
       "        1.00695416e+02,  9.80687852e+01,  8.34968275e+01,  7.53025397e+01,\n",
       "        6.89260158e+01,  6.67786503e+01,  6.09412873e+01,  5.30974002e+01,\n",
       "        4.71797825e+01,  4.50701108e+01,  4.41349593e+01,  4.03313416e+01,\n",
       "        3.95741636e+01,  3.74000035e+01,  3.44211326e+01,  3.30031584e+01,\n",
       "        3.03317756e+01,  2.88994580e+01,  2.76478754e+01,  2.57708695e+01,\n",
       "        2.44506430e+01,  2.31640106e+01,  2.26956957e+01,  2.16925102e+01,\n",
       "        2.10114869e+01,  2.00984697e+01,  1.86489543e+01,  1.83733216e+01,\n",
       "        1.72517802e+01,  1.60481189e+01,  1.54406997e+01,  1.48356499e+01,\n",
       "        1.44273357e+01,  1.42318192e+01,  1.35592064e+01,  1.30696836e+01,\n",
       "        1.28193512e+01,  1.22093626e+01,  1.15228376e+01,  1.12141738e+01,\n",
       "        1.02585936e+01,  9.86906139e+00,  9.58794460e+00,  9.41686288e+00,\n",
       "        9.20276340e+00,  8.63791398e+00,  8.20622561e+00,  8.01020114e+00,\n",
       "        7.53391290e+00,  7.33168361e+00,  7.09960245e+00,  7.02149364e+00,\n",
       "        6.76557324e+00,  6.34504733e+00,  6.01919292e+00,  5.81680918e+00,\n",
       "        5.44653788e+00,  5.12338463e+00,  4.79593185e+00,  4.47851795e+00,\n",
       "        4.50369987e+00,  4.27479386e+00,  3.89124198e+00,  3.56466892e+00,\n",
       "        3.32248982e+00,  2.97665360e+00,  2.61425544e+00,  2.31802829e+00,\n",
       "        2.17171124e+00,  1.99239284e+00,  1.96616566e+00,  1.88149281e+00,\n",
       "        1.79228288e+00,  1.71378363e+00,  1.68028783e+00,  1.60686268e+00,\n",
       "        1.47158244e+00,  1.40656712e+00,  1.37808906e+00,  1.27967672e+00,\n",
       "        1.22803716e+00,  1.18531109e+00,  9.38857180e-01,  9.18222054e-01,\n",
       "        8.26265393e-01,  7.96585842e-01,  7.74597255e-01,  7.14002770e-01,\n",
       "        6.79457797e-01,  6.37928310e-01,  6.24646758e-01,  5.34605353e-01,\n",
       "        4.60658687e-01,  4.24265893e-01,  4.08634622e-01,  3.70321764e-01,\n",
       "        3.67016386e-01,  3.35858033e-01,  3.29780397e-01,  2.94348753e-01,\n",
       "        2.84154176e-01,  2.72703994e-01,  2.63265991e-01,  2.45227786e-01,\n",
       "        2.25805135e-01,  2.22331919e-01,  2.13514673e-01,  1.93961935e-01,\n",
       "        1.91647269e-01,  1.83668491e-01,  1.82518017e-01,  1.65310922e-01,\n",
       "        1.57447909e-01,  1.51263974e-01,  1.39427297e-01,  1.32638882e-01,\n",
       "        1.28000027e-01,  1.13559952e-01,  1.12576237e-01,  1.08809771e-01,\n",
       "        1.07136355e-01,  8.60839655e-02,  8.50467792e-02,  8.29254355e-02,\n",
       "        7.03701660e-02,  6.44475619e-02,  6.09866327e-02,  6.05709478e-02,\n",
       "        5.93963958e-02,  5.22163549e-02,  4.92729703e-02,  4.80022983e-02,\n",
       "        4.51487439e-02,  4.30180504e-02,  4.13368324e-02,  4.03281604e-02,\n",
       "        3.91576587e-02,  3.54198873e-02,  3.31199510e-02,  3.13547234e-02,\n",
       "        3.07226509e-02,  2.98354196e-02,  2.81949091e-02,  2.49158051e-02,\n",
       "        2.36374781e-02,  2.28360210e-02,  2.19602047e-02,  2.00166957e-02,\n",
       "        1.86597535e-02,  1.80415918e-02,  1.72261012e-02,  1.60703860e-02,\n",
       "        1.49566735e-02,  1.40165444e-02,  1.31296856e-02,  1.21358005e-02,\n",
       "        1.07166503e-02,  1.01045695e-02,  9.76055340e-03,  9.16740926e-03,\n",
       "        8.78108857e-03,  8.67465278e-03,  8.30918514e-03,  8.05104488e-03,\n",
       "        7.56152126e-03,  7.31508852e-03,  7.26347037e-03,  6.65728354e-03,\n",
       "        6.50769617e-03,  6.28009879e-03,  6.19160730e-03,  5.64130272e-03,\n",
       "        5.30195373e-03,  5.07453702e-03,  4.47372286e-03,  4.32543895e-03,\n",
       "        4.22006582e-03,  3.97065729e-03,  3.75292740e-03,  3.64861290e-03,\n",
       "        3.38915810e-03,  3.27965962e-03,  3.06633825e-03,  2.99206786e-03,\n",
       "        2.83586784e-03,  2.74987243e-03,  2.31066313e-03,  2.26782347e-03,\n",
       "        1.82206662e-03,  1.74955624e-03,  1.69305161e-03,  1.66624597e-03,\n",
       "        1.55346749e-03,  1.51278404e-03,  1.47296800e-03,  1.33617458e-03,\n",
       "        1.30517592e-03,  1.24056353e-03,  1.19823961e-03,  1.14381059e-03,\n",
       "        1.13027458e-03,  1.11081803e-03,  1.08359152e-03,  1.03517496e-03,\n",
       "        1.00164593e-03,  9.50024604e-04,  8.94981182e-04,  8.74363843e-04,\n",
       "        7.98497544e-04,  7.51612219e-04,  6.63964301e-04,  6.21097642e-04,\n",
       "        6.18098603e-04,  5.72611402e-04,  5.57509230e-04,  5.47002381e-04,\n",
       "        5.27195077e-04,  5.11487997e-04,  4.87787872e-04,  4.74249071e-04,\n",
       "        4.52367688e-04,  4.24431100e-04,  4.19119024e-04,  3.72489906e-04,\n",
       "        3.38125455e-04,  3.34002143e-04,  2.97951371e-04,  2.84845900e-04,\n",
       "        2.79038287e-04,  2.77054476e-04,  2.54815125e-04,  2.67962796e-04,\n",
       "        2.29230595e-04,  1.99245436e-04,  1.90381389e-04,  1.84497913e-04,\n",
       "        1.77415682e-04,  1.68160613e-04,  1.63992030e-04,  1.58025552e-04,\n",
       "        1.54226003e-04,  1.40079892e-04,  1.46097434e-04,  1.46890640e-04,\n",
       "        1.35736724e-04,  1.22704034e-04,  1.16752515e-04,  1.14080847e-04,\n",
       "        1.04252869e-04,  9.90265102e-05,  9.66039063e-05,  9.60766568e-05,\n",
       "        9.16166321e-05,  9.07003470e-05,  8.60212632e-05,  8.32654022e-05,\n",
       "        7.70526076e-05,  7.36470021e-05,  7.24998302e-05,  6.80209909e-05,\n",
       "        6.68682698e-05,  6.14500421e-05,  5.99843176e-05,  5.49918003e-05,\n",
       "        5.24646953e-05,  5.13403846e-05,  5.02336259e-05,  4.89288503e-05,\n",
       "        4.51104474e-05,  4.29823764e-05,  4.18869715e-05,  4.14341561e-05,\n",
       "        3.94822843e-05,  3.80307292e-05,  3.57776535e-05,  3.43901591e-05,\n",
       "        2.98089202e-05,  2.72388358e-05,  2.42608885e-05,  2.30962279e-05,\n",
       "        2.27807558e-05,  2.14440814e-05,  1.66549051e-05,  1.96208174e-05,\n",
       "        1.91217363e-05,  1.88276186e-05,  1.46846459e-05,  1.43753346e-05,\n",
       "        1.39779891e-05,  1.21760519e-05,  1.20295835e-05,  1.13426750e-05,\n",
       "        1.09258905e-05,  1.02782989e-05,  1.01021805e-05,  9.72678790e-06,\n",
       "        9.64538290e-06,  9.23630201e-06,  8.93991856e-06,  8.34247944e-06,\n",
       "        7.36188584e-06,  7.20354827e-06,  6.69282813e-06,  6.49477813e-06,\n",
       "        5.09342483e-06,  5.31392219e-06,  5.67034891e-06,  5.91044556e-06,\n",
       "        6.00244889e-06,  4.65422046e-06,  4.45482133e-06,  4.11265576e-06,\n",
       "        3.48065952e-06,  3.65202839e-06,  3.77558986e-06,  2.78847699e-06,\n",
       "        2.66299627e-06,  2.57492503e-06,  2.39210232e-06,  2.06298821e-06,\n",
       "        2.00824520e-06,  1.76373602e-06,  1.58273269e-06,  1.32211395e-06,\n",
       "        1.49813697e-06,  1.44003524e-06,  1.42489428e-06,  1.10002716e-06,\n",
       "        9.01008863e-07,  8.49881106e-07,  7.62521870e-07,  6.57641103e-07,\n",
       "        5.85636641e-07,  5.33937361e-07,  4.16077215e-07,  3.33765858e-07,\n",
       "        2.95575265e-07,  2.54744632e-07,  2.20144574e-07,  1.86314524e-07,\n",
       "        1.77370968e-07,  1.54794344e-07,  1.47331687e-07,  1.39738552e-07,\n",
       "        1.04110968e-07,  1.00786519e-07,  9.38635089e-08,  9.10853310e-08,\n",
       "        8.71546318e-08,  7.48338889e-08,  6.06817435e-08,  5.66479200e-08,\n",
       "        5.24576912e-08,  4.57020635e-08,  2.89942624e-08,  2.60449426e-08,\n",
       "        2.17618741e-08,  2.10987989e-08,  1.75542293e-08,  1.34637032e-08,\n",
       "        1.27167439e-08,  1.23258200e-08,  1.04987513e-08,  9.86367967e-09,\n",
       "        8.49421990e-09,  9.33428128e-09,  7.42189796e-09,  6.46870639e-09,\n",
       "        5.76456091e-09,  6.84633770e-09,  5.01137938e-09,  3.48686421e-09,\n",
       "        2.91267183e-09,  2.77880629e-09,  1.73093443e-09,  1.42391198e-09,\n",
       "        9.24975825e-10,  1.16455088e-09,  1.11815936e-09,  1.80003545e-10,\n",
       "        1.97062445e-10,  2.61930902e-10,  6.95073907e-10,  6.13253990e-10,\n",
       "        5.27645104e-10, -1.66583563e-15,  1.41038247e-15,  4.97505170e-16,\n",
       "       -2.85679035e-17, -3.75443980e-20,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00,\n",
       "        0.00000000e+00,  0.00000000e+00])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataMat = pca.replaceNanWithMean()\n",
    "meanValue = dataMat.mean(axis=0)\n",
    "# Remove the mean\n",
    "dataMat = dataMat - meanValue\n",
    "# Compute the covariance matrix\n",
    "covMat = np.cov(dataMat, rowvar=0)\n",
    "# Find the eigenvalues and eigenvectors of the covariance matrix\n",
    "eigVals, eigVecs = np.linalg.eig(covMat)\n",
    "eigVals"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAblklEQVR4nO3de3Bc53nf8e+zC4DAggDIBUGCJAiQkqgLwciyDMtqlKiSJYuQ25Bp4gs1vciNW43bcGLXbidy7VFd9Y/EUpv0xknD2J4qGbuS4iYWnaFF24k8rj2RQlqmJIIUJYjmBYREgqR4gQgSt6d/7C5wuFwAS2J3z+7Z32cGg3N5d/HgYPnbw3ff8x5zd0REpPLFwi5AREQKQ4EuIhIRCnQRkYhQoIuIRIQCXUQkImrC+sFLlizx1atXh/XjRUQq0s9+9rOT7t6Wa19ogb569Wp2794d1o8XEalIZnZ4pn3qchERiQgFuohIRCjQRUQiIq9AN7NeMztgZv1m9ugMbT5hZvvMrM/MvlXYMkVEZC5zfihqZnFgK/ARYADYZWbb3X1foM1a4IvAXe7+rpktLVbBIiKSWz5n6HcA/e5+0N1HgaeBTVlt/iWw1d3fBXD3E4UtU0RE5pJPoK8EjgbWB9Lbgm4EbjSzn5rZi2bWm+uJzOwRM9ttZruHhoaurWIREckpn0C3HNuy59ytAdYC9wAPAV8zs0VXPMh9m7v3uHtPW1vOcfFz2nXoNF99/nU07a+IyOXyCfQBYFVgvQMYzNHmOXcfc/dfAAdIBXzBvTZwlj/60Vucfm+0GE8vIlKx8gn0XcBaM1tjZnXAZmB7VpvvAPcCmNkSUl0wBwtZaEZXawKAw6cvFOPpRUQq1pyB7u7jwBZgJ7AfeNbd+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mQXp5dY3r9in/vpagvvf1/Z153gbahHMP5fOnSfxGRiCjnLhcREbkKCnQRkYhQoIuIRIQCXUQkIhToIiIRoUAXEYkIBbqISET8f0R0I1qDZAVuAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#def plotEigVal(eigVals):\n",
    "sum = eigVals.sum()\n",
    "plt.plot(eigVals[:20]/sum)\n",
    "plt.show()   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
